<%--
  Created by IntelliJ IDEA.
  User: 88403
  Date: 2021/6/16
  Time: 23:53
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>后台登录</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/login2.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/login.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/admin_login.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/admin/js/jquery.min.js"></script>
<script type="text/javascript">
    $(function(){

        //2.点击验证码 跟新验证码
        $("#pagecode").click(function(){
            $("#pagecode").attr("src","${pageContext.request.contextPath}/admin/validCode?r="+Math.random());
        });

        //4.两周以内自动登录  友好提示
        $("#autoLogin").click(function(){
            if(this.checked){
                $("#autoLoginMsg").html("公司电脑请勿勾选此项").css("color","red");
            }else{
                $("#autoLoginMsg").html("");
            }
        })
    })


</script>

</head>
<body>
<div class="admin_login_wrap">
    <h1>登录后台管理</h1>
    <div class="adming_login_border" style="height: 500px;width: 450px">
        <div class="admin_input">
            <form action="${pageContext.request.contextPath}/admin/login" method="post">

                <ul class="admin_items">

                    <li>
                        <label >用户名：</label>
                        <input type="text" name="name" value="" id="user" size="40" class="admin_input_style"  placeholder="请输入你的用户名" />
                    </li>
                    <li>
                        <label >密码：</label>
                        <input type="password" name="password" value="" id="pwd" size="40" class="admin_input_style" placeholder="请输入你的密码" />
                    </li>
                    <div class="username">
                        <div class="left fl">验证码:&nbsp;</div>
                        <div class="right fl"><input  name="vcode" type="text" placeholder="验证码" style="height: 50px;width: 80px"/>
                            <img  id="pagecode" src="${pageContext.request.contextPath}/admin/validCode"><label id="checkMsg"></label>
                        </div>
                    </div>
                    <div class="username">
                        <div class="left fl">&nbsp;&nbsp;&nbsp;&nbsp;</div>
                        <div class="right fl"><label id="checkMsg"></label></div>
                    </div>

                    <li>
                        <div class="username">
                            <input id="autoLogin" name="auto" type="checkbox" />&nbsp;&nbsp;两周以内自动登录
                            <span id="autoLoginMsg"></span>
                        </div>
                        <input type="submit" tabindex="3" value="立即登录" class="btn btn-primary" />
                    </li>
                    <span style="color:red">${msg}</span>
                </ul>
            </form>
        </div>
    </div>
</div>

</body>
</html>
